/*

Copyright (c) 2004-2009 Krzysztof Ostrowski. All rights reserved.

Redistribution and use in source and binary forms,
with or without modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above
   copyright notice, this list of conditions and the following
   disclaimer in the documentation and/or other materials provided
   with the distribution.

THIS SOFTWARE IS PROVIDED "AS IS" BY THE ABOVE COPYRIGHT HOLDER(S)
AND ALL OTHER CONTRIBUTORS AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDER(S) OR ANY OTHER
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

*/

using System;

/// <summary>
/// This namespace contains all of QuickSilver code.
/// </summary>	
namespace QS
{
	/// <summary>
	/// This enumeration holds identifiers of the serializable classes built into QuickSilver.
	/// </summary>	
	public enum ClassID : ushort 
	{
        /// <summary>
        /// None of the classes should have this identifier; if encountered at runtime, it represents a bug or an uninitialized field.
        /// </summary>
		UnknownThing										=    0,

        /// <summary>
        /// Represents an empty portion of data.
        /// </summary>
		Nothing												    =	  1,

		// Krzys's infrastructure components
		AnyMessage											= 1000,
		BinaryMessage,
		NetworkAddress,
		ObjectAddress,
		EmptyObject,
		BaseSender_OurMessage,							
		CryptographicSender_OurMessage,
		DirectIPMCSender_OurMessage,
		//SimpleSender4_OurMessage,
		//SimpleSender5_OurMessage,
		RPCServerRequest,
		RPCServerResponse,
		Collections_Hashtable,
		FBCASTSender_OurMessage,
		FBCASTSender_AckMessage,
		ReliableSender_OurMessage,
		ReliableSender_AckMessage,
		SimpleFlushingDevice,
		VSSender_Message,
		VSSender_Acknowledgement,
		SimpleMulticastingSender_Message,
		FlushingReport,
		ReceiverReport,
		ForwardingRequest_ForwardedMessage,
		XmlMessage,
		BlockOfData,
		OutgoingVector,
		AccumulatingBufferController_OutgoingBuffer,
		SplittingBuffer,
		VirtualCommunicationSubsystem_WrappedData,
		GenericVSSender_MessageWrapper,
		CMSWrapper_WrappedMessage,
		Sequencer_Wrapper,
		Sequencer_Wrapper_SeqNo,
		Base2_XmlObject,
		Base2_StringWrapper,
		Multicasting2_SimpleMulticastingSender_Multicast,
		Multicasting2_SimpleMulticastingSender_Acknowledgement,
		VSMessage,
		VSMessageID,
		ViewController,
		VS5_VC2_OutgoingRequest,
		VS5_VC2_IncomingRequest,
		GenericRCCDescriptor,
		GenericVSMPPMID,
		AddressedObject,
		WrappedIO,
		WrappedRPCCall,
		NullObject,
		AtomicScatterer_Wrapper,
		AtomicScatterer_MessageID,
        SimpleRS_Message,
        SimpleRS_Ack,
        AccumulatingController_MessageCollection,
        Base3_RegionID,
        Base3_GroupID,
        Base3_Region,
        Base3_Group,
        Interoperability_Remoting_HeaderWrapper,
        Interoperability_Remoting_RequestWrapper,
        RPC3_SimpleCaller_Request,
        RPC3_SimpleCaller_Response,
        Base3_Message,
        Base3_Result,
        InstanceID,
        FailureDetector_Beacon,
        Membership2_Protocol_Notification,
        RegionSig,
        MembershipChangeRequest,
        Senders3_ReliableSender_Message,
        Senders3_ReliableSender_Ack,
        Multicasting3_MessageID,
        Multicasting3_MulticastMessage,
        Aggregation_SimpleController_Message,
        AggregationID,
        Base3_Segments,
        ChoppingSender_Chunk,
		GroupID,
		ViewID,
		Aggregation3_ChannelID,
		Aggregation3_Agent_Message,
		Message,
		CompressedObject,
		Double,
		Multicasting3_Minimum,
		RegionMin,
		Aggregation_ControllerMessage,
		Aggregation4_AggregationController1_Notification,
		Aggregation4_Agent_Message,
		Aggregation4_AggregationController2_Notification,
		Base3_Bytes,
		Base3_SerializableObject,
		Senders3_ReliableSender2_Message,
		Senders3_ReliableSender2_Command,
		Senders5_ReliableSink_Message,
		Senders5_ReliableSink_Command,
        FailureDetection_Centralized_Server_HeartbeatMessage,
        Senders6_InstanceSender_Message,
        Senders6_ReliableSender_Message,
        FailureDetection_Change,
        Multicasting5_Message,
        Multicasting5_Acknowledgement,
        Gossiping2_RegionalAgent_IntraregionalMessage,
        Gossiping2_RegionalAgent_InterregionalMessage,
        Gossiping2_RingMessageContainer,
        Gossiping2_ChannelID,
        Gossiping2_GossipAdapter_ChannelDic,
        Gossiping2_RegionAggregated,
        Components2_SeqContainer1,
        Components2_SeqContainer2,
        Multicasting5_MessageRV,
        Multicasting5_CompressedAckSet,
        Gossiping2_Shipment,
        Gossiping2_ShipmentCollection,
        Components2_MessageCollection,
        Multicasting5_AcknowledgementRV,
        Rings4_Token,
        Rings4_TokenCollection,
        Multicasting5_ForwardingRV,
        Rings4_ObjectRV,
        Rings4_ControlReq,
        Ring4_Receiver_Control,
        Ring4_NAKs,
        Connections_Message,
        Connections_MethodCall,
        Base3_XmlObject,
        Base3_BinaryObject,
        Rings5_Request, 
        Rings5_Response,
        Rings5_RingAgent_Token,
        Rings6_ReceivingAgent1_InterPartitionToken,
        Rings6_ReceivingAgent1_IntraPartitionToken,
        Rings6_ReceivingAgent1_Receiver_InterPartitionToken,
        Rings6_ReceivingAgent1_Receiver_IntraPartitionToken,
        Rings6_ReceivingAgent_Agent_Receiver_Pull,
        Rings6_ReceivingAgent_Agent_Receiver_Ack,
        Rings6_ReceivingAgent_Agent_Receiver_Forward,
        SequenceNo,
        TMS_Data_DataSeries,
        TMS_Data_XYSeries,
        TMS_Data_MultiSeries,
        Attribute,
        AttributeSet,
        TMS_Data_Data1D,
        TMS_Data_Data2D,
        TMS_Data_DataCo,
        TMS_Data_Axis,
        Senders11_InstanceMessage,
        Receivers5_InstanceAck,
        Int32x2,
        Now,
        Embeddings2_Types_Interface,
        Embeddings2_Types_Method,
        Embeddings2_Types_Parameter,
        Embeddings2_Types_ReferencedType,
        Embeddings2_ReplicationGroupType,
        Embeddings2_MethodCallRequest,
        Embeddings2_MethodCallResponse,
        Membership3_Expressions_Group,
        Membership3_Expressions_Intersection,
        Membership3_Expressions_Union,
        Membership3_Expressions_Minus,
        Membership3_Requests_Open,
        Membership3_Requests_Close,
        Membership3_Requests_Crash,
        Membership3_Requests_Resync,
        Embeddings2_ReplicationGroupType2,
        Membership3_Notifications_Notification,
        Membership3_Responses_Opened,
        Membership3_Responses_Succeeded,
        Membership3_Responses_Exception,
        Membership3_Notifications_CreateGroup,
        Membership3_Notifications_CreateRegion,
        Membership3_Notifications_CreateGroupView,
        Membership3_Notifications_CreateRegionView,
        Membership3_Notifications_CreateGroupViewRevision,
        Membership3_Notifications_CreateRegionViewRevision,
        Membership3_Notifications_CreateLocalView,
        Membership3_Notifications_CreateGlobalView,
        Membership3_Notifications_CreateIncomingView,
        Membership3_Notifications_CreateSession,
        Membership3_Notifications_CreateSessionView,
        Membership3_Notifications_CreateClientView,
        Membership3_Notifications_CreateMetaNode,
        Membership3_Notifications_CreateMetaNodeRevision,
        Infrastructure_Components_GVID,
        Infrastructure2_Embeddings_ReplicatedObjects_MethodCall,
        Infrastructure2_Embeddings_ReplicatedObjects_Response,
        Fx_Services_Base_Message,
        Fx_Services_Base_Response,
        QS_TMS_Data_Series,
        Rings6_ReceivingAgent_Agent_Receiver_PartitionAcknowledgement,
        Batching_Unpacker_Request,
        SimpleChoppingSender_Chunk,
        Multicasting7_MessageRV2,
        Rings6_ReceivingAgent_Agent_Receiver_Ack2,
        Fx_Machine_Components_ReplicaPersistentState,
        Fx_Machine_Components_ReplicaPersistentState_Operation,
        Fx_Collections_Key,
        Fx_Collections_Key_Operation,
        Fx_Collections_Key_Value,
        Fx_Collections_Key_Collection,
        Fx_Machine_Base_MembershipView,
        Fx_Base_ServiceID,
        Fx_Machine_Base_MemberInfo,
        Fx_Base_ID,
        Fx_Base_Incarnation,
        Fx_Base_Address,
        Fx_Machine_Components_ReplicaPersistentState_Operation_SetReplicaName,
        Fx_Machine_Components_ReplicaPersistentState_Operation_SetReplicaIncarnation,
        Fx_Machine_Components_ReplicaPersistentState_Operation_SetMachineName,
        Fx_Machine_Components_ReplicaPersistentState_Operation_SetMachineIncarnation,
        Fx_Machine_Components_ReplicaPersistentState_Operation_SetMembershipView,
        Fx_Machine_Components_ReplicaPersistentState_Operation_SetReplicaAddress,
        Fx_Machine_Components_ReplicaPersistentState_Operation_ModifyDiscoveryAddresses,
        Fx_Machine_Components_Hello,
        Fx_Machine_Components_ReplicaPersistentState_Operation_SetDisseminationAddress,
        Fx_Machine_Components_ServiceControllerOperation,
        Fx_Machine_Components_Append,
        Fx_Machine_Components_ReplicaPersistentState_Operation_AddSuspectedInView,
        Fx_Machine_Components_Token,
        Fx_Machine_Components_PeerInfo,
        Fx_Machine_Components_ReplicaNonpersistentState,
        Fx_Machine_Components_ReplicaPersistentState_Operation_AddServiceControllerOperations,
        Fx_Machine_Base_Components_ServiceControllerState,
        Fx_Machine_Base_Components_ServiceControllerPersistentState,
        Fx_Machine_Base_Components_ServiceControllerNonpersistentState,
        Fx_Machine_Applications_Test_Counter,
        Fx_Machine_Applications_Test_IncrementCounter,
        Fx_Machine_ServiceControl_ServiceClass,
        Fx_Base_QualifiedID,
        Fx_Backbone_Node_Open,
        Fx_Backbone_Node_Close,
        Fx_Backbone_Node_Sync,
        Fx_Backbone_Node_Message,
        Fx_Backbone_Node_Acknowledgement,
        Fx_Backbone_Controller_ProviderUpdate,
        Fx_Backbone_Controller_TopicUpdate,
        Fx_Backbone_Controller_Update,
        Fx_Backbone_Controller_Register,
        Fx_Backbone_Scope_MembershipID,
        Fx_Unmanaged_Msg,
        Fx_Base_AgentID,
        Fx_Agents_Components_Driver1_Token,
        Fx_Agents_Components_Driver2_Token,
        Fx_Base_AgentIncarnation,
        Fx_Agents_Base_AggregationToken,
        Fx_Agents_Base_DisseminationToken,
        Fx_Base_SessionID,
        Fx_Agents_Base_Plan_Info,
        Fx_Protocols_Simple2PC_AggregationToken,
        Fx_Protocols_Simple2PC_DisseminationToken,
        Fx_Runtime_UIntSet,
        Fx_Runtime_Version,
        Fx_Runtime_Versioned,
        Fx_Agents_Base_ParentInfo,
        Fx_Runtime_UInt,
        Fx_Protocols_Cleanup_AggregationToken,
        Fx_Protocols_Cleanup_DisseminationToken,
        Fx_Protocols_Protocol_AggregationToken,
        Fx_Protocols_Protocol_DisseminationToken,
        Fx_Protocols_CoordinatedPhases_AggregationToken,
        Fx_Protocols_CoordinatedPhases_DisseminationToken,
        Machine_Persisted,
        Machine_Persisted_Operation,
        Machine_Persisted_Operation_SetMachineID,
        Machine_MemberInfo,
        Machine_MembershipView,
        Framework2_Message,
        Fx_Protocols_Generated_AggregationToken,
        Fx_Protocols_Generated_DisseminationToken,
        Fx_Runtime_Bool,
        Fx_Runtime_Void,
        Fx_Object_ObjectId,
        Fx_Live_InterfaceID,
        UnicodeText,
        Centralized_CC_Message,
        Centralized_CC_Metadata,
        Fx_Channel_Message_Coordinates,
        Fx_Channel_Message_Color,
        Fx_Channel_Message_Desktop_State,
        Fx_Channel_Message_Desktop_Object,
        Fx_Channel_Message_Desktop_Operation_Add,
        Fx_Channel_Message_Desktop_Operation_Move,
        Fx_Channel_Message_Folder_State,
        Fx_Channel_Message_Folder_Object,
        Fx_Channel_Message_Folder_Operation_Add,
        Fx_Channel_Message_Folder_Operation_Remove,
        Fx_Channel_Message_Folder_Operation_Rename,
        Fx_Channel_Message_Video_Frame,
        QsmControl,
        QsmObject,
        QsmMetadata,
        ChannelObject,
        UplinkObject,
        Properties_Control,
        Properties_Message,
        Fx_Base_Unsigned_32,
        Fx_Base_Unsigned_64,
        Fx_Base_Unsigned_128,
        MembershipChannel_Member_,
        MembershipChannel_Membership_,
        Token_,
        MessageToken_,
        IdToken_,
        OrderToken_,
        Array_,
        TokenArray_,
        MsgsForEpochToken,
        ReliableMsgSetToken,
        AggregateToken_,
        KVToken_,
        KVSetToken_,
        DataFlowToken_,
        Identifier,
        MessageIdentifier,
        Incarnation,
        Name,
        Address,
        Index,
        Round_,
        MulticastClient_Checkpoint_,
        MulticastClient_Message_,
        PropertyVersion,
        PropertyValue,
        PropertyValues,
        DelegationControl_,
        PropertyControl,
        PropertiesControl,
        Experiment_Component_Worker,
        Runtime_Result,
        Runtime_Ready,
        Experiment_Component_WordCount,
        Experiment_Component_ReverseIndex,
        Experiment_Component_ReplicatedDictionary,
        Experiment_Component_WebCrawler,
        Experiment_Component_StringMatch,
        Experiment_Component_KMeans,
        Experiment_Component_SplayTreeDictionary,
        Experiment_Component_EmptyDictionary,
        SwitchMessage_,
        TransportMessage_,
        TransportMessage_1,
        Benchmark_01,
        Benchmark_02,
        Benchmark_03,
        Benchmark_04,
        Benchmark_05,
        PriorityQueue_1,
        PriorityQueue_2,
        PriorityQueue_3,
        Benchmark_06,
        Benchmark_07,
        Benchmark_08,
        Benchmark_09,
        Benchmark_10,
        Benchmark_11,
        Benchmark_12,
        Benchmark_13,
        Benchmark_14,
        Benchmark_15,
        Experiment_Component_Membership,
        Experiment_Component_Serializer,
        Fx_Experiment_Benchmark_9_Item,
        WorkerMessage_,

		// Krzys's unit tests and other apps
		CMSTest001											            = 2000,
		CMSTest002,
        Fx_App3_State,
        Fx_App3_State_Operation,

		// Common

        // Qi's
        STUNAddress                                         = 3000,
        BounceMessage,
        PubSubData,

        BootstrapMin                                        = 3010,
        BootstrapJoin,
        BootstrapAlive,
        BootstrapLeave,
        BootstrapMember,
        BootstrapMembership,
        BootstrapMax                                        = 3049,

        EUID                                                = 3050,
        TransmitterMsg,
        PatchInfo,
        HeatbeatMember                                      = 3099,

        OmniMin                                             = 3100,
        OmniJoin,
        OmniRedirect,
        OmniAck,
        OmniMaintain,
        OmniMaintainAck,
        OmniData,
        OmniMax                                             = 3149,

        IpmcMin                                             = 3150,    
        IpmcData,
        IpmcGossip,
        IpmcAcclaim,
        IpmcMax                                             = 3199,

        DonetMin                                            = 3200,
        DonetMembership,
        DonetBuffermap,
        DonetRequest,
        DonetData,
        DonetMax                                            = 3249,

        GradientMin                                         = 3300,
        GradientData,
        GradientReport,
        //Gradient
        GradientMax                                         = 3399,

		// Mahesh's
		Mahesh1_AVeryNiceMessage							= 4000,
		Mahesh_CSGMSJoinMessage,
		Mahesh_CSGMSLeaveMessage,
		Mahesh_CSGMSAddUpdateMessage,
		Mahesh_CSGMSRemoveUpdateMessage,
		Mahesh_CSGMSHeartBeatMessage,
		Mahesh_CSGMSHeartBeatResponseMessage,
		Mahesh_CSGMSFailureNotificationMessage,
		Mahesh_CSGMSWholeViewMessage,
		Mahesh_CSGMSImmutableView,
		Mahesh_CSGMSImmutableSubView,

		// Stefan's
		Stefan1_AVeryNiceMessage							= 5000,
		Stefan_QsInfoObjectLight,

        // Matt's
        Matt_TimedMessage                                   = 6000,

		// User applications
        /// <summary>
        /// The smallest unique class identifier that can be used by the user's application.
        /// </summary>
		UserMin							                                    = 10000,

        /// <summary>
        /// The largest unique class identifier that can be used by the user's application.
        /// </summary>
		UserMax							                                    = ushort.MaxValue
	}
}
